<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
    
/**
 * Conterted Mysql date format to my custom format
 *
 * @param string mysql date format
 * @param bool if is true display time
 * @return string
 */
function format_date($date, $time = TRUE) {

    $date = strtotime($date);

    setlocale(LC_TIME, 'tr_TR.UTF-8', 'tr_TR', 'tr', 'turkish');

    if ($time)
        return strftime("%#d %B %Y %A %H:%M:%S", $date);
    else
        return strftime("%#d %B %Y", $date);

    // Not: windowsta %e %#d ile değişiyor.
}
    
    
/* End of file MY_date_helper.php */